package com.mall.feign.clients;

import com.mall.feign.config.FeignRequestInterceptor;
import com.mall.model.domain.PmsProduct;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "mall-service-commodity",configuration = {FeignRequestInterceptor.class})
public interface CommodityClient {

    /**
     * 远程调用商品列表
     * @return
     */
//    @GetMapping("/list/withChildren")
//    R withChildren();

    /**
     * 远程调用feign
     * @param productId
     * @return
     */
    @GetMapping("/product/{productId}")
    PmsProduct findById(@PathVariable("productId") Long productId);

}